package com.jiliang.common.utils;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.AES;

/**
 * 汇中 AES 加密类 引用
 */
public class HzAesEncryUtil {


    public static AES getAes(String key) {
        byte[] keyBytes = key.getBytes();
        return SecureUtil.aes(keyBytes);

    }

    public static String aesEncrypt(String key, String value) {
        AES aes = getAes(key);
        String result = aes.encryptHex(value);
        return result;
    }

    public static void main(String[] args) {

        //测试加密
        HzAesEncryUtil.aesEncrypt("key值","qwertyuiop");
    }
}
